package com.atguigu.Spring5.pojo;

import org.springframework.beans.factory.FactoryBean;

import java.util.ArrayList;

/**
 * @Author xiao hu die
 * @Date 2022/3/29 18:42
 * @Version 1.0
 */
public class MyBean implements FactoryBean<Student> {
    public MyBean() {
        System.out.println("MyBean的无参构造");
    }

    @Override
    public Student getObject() throws Exception {
        Student student = new Student();
        ArrayList<String> list = new ArrayList<>();
        list.add("1");
        list.add("2");
       student.setStringList(list);
        return student;
    }

    @Override
    public Class<?> getObjectType() {
        return null;
    }

    @Override
    public boolean isSingleton() {
        return FactoryBean.super.isSingleton();
    }
}
